#ifndef DATA_WRITER_FACTORY_H_
#define DATA_WRITER_FACTORY_H_

#include <string>

using namespace std;

class DataWriterFactory;

class DataWriterFile {
friend class DataWriterFactory;
public:
	DataWriterFile(){}
	FILE		*File;
	bool		IsOpen;
	string		Name;
};

class DataWriterFactory
{
public:
	static void Create(int max);
	static DataWriterFactory* GetInstance() {return Instance;}

	int AddWriter(const string &key, const string &fileName);
	int GetWriter(const string &key);

private:
	DataWriterFactory();
	~DataWriterFactory();

	void init(int max);
	static DataWriterFactory	*Instance;

	DataWriterFile		*FileWriters;
	int					FileWritersNum;
};

#endif